﻿@* Views/Profile/Index.cshtml *@
@model ProfileViewModel
@* 在原有代码基础上修改StrategyLevel的显示部分 *@
@{
    // 定义等级数组（注意索引从0开始）
    ViewData["Title"] = "编辑个人信息";
    var labelLevels = new[] { "最强王者", "大师1", "大师2", "大师3" ,"大师4", "大师5", "翡翠1", "翡翠2", "翡翠3", "翡翠4", "翡翠5", "黄金1", "黄金2", "黄金3", "黄金4", "黄金5", "白银1", "白银2", "白银3", "白银4", "白银5", "青铜1", "青铜2", "青铜3", "青铜4", "青铜5", "黑铁1", "黑铁2", "黑铁3", "黑铁4", "黑铁5"};
}

<div class="row">
    <div class="col-md-6">
        @if (TempData["SuccessMessage"] != null)
        {
            <div class="alert alert-success">@TempData["SuccessMessage"]</div>
        }

        <form asp-action="Index">
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>

            <div class="form-group">
                <label asp-for="Email" class="control-label"></label>
                <input asp-for="Email" class="form-control" readonly />
                <input type="hidden" asp-for="Email" />
            </div>

            <div class="form-group">
                <label asp-for="EquityCoin" class="control-label"></label>
                <input asp-for="EquityCoin" class="form-control" readonly/>
                <input type="hidden" asp-for="EquityCoin" />
            </div>

            <div class="form-group">
                <label asp-for="StrategyLevel" class="control-label"></label>
                <input asp-for="StrategyLevelDisplay" class="form-control" readonly
                       value="@Model.StrategyLevelDisplay" />
                <input type="hidden" asp-for="StrategyLevel" />
            </div>

            <div class="form-group">
                <label asp-for="TacticianLevel" class="control-label"></label>
                <input asp-for="TacticianLevelDisplay" class="form-control" readonly
                       value="@Model.TacticianLevelDisplay" />
                <input type="hidden" asp-for="TacticianLevel" />
            </div>

            <div class="form-group">
                <label asp-for="WarriorLevel" class="control-label"></label>
                <input asp-for="WarriorLevelDisplay" class="form-control" readonly
                       value="@Model.WarriorLevelDisplay"/>
                <input type="hidden" asp-for="WarriorLevel" />
            </div>

            <div class="form-group">
                <label asp-for="FullName" class="control-label"></label>
                <input asp-for="FullName" class="form-control" />
                <span asp-validation-for="FullName" class="text-danger"></span>
            </div>

            <div class="form-group">
                <label asp-for="Gender" class="control-label"></label>
                <select asp-for="Gender" class="form-control">
                    <option value="">请选择性别</option>
                    <option value="男">男</option>
                    <option value="女">女</option>
                    <option value="其他">其他</option>
                </select>
                <span asp-validation-for="Gender" class="text-danger"></span>
            </div>

            <div class="form-group mt-3">
                <input type="submit" value="保存更改" class="btn btn-primary" />
            </div>
        </form>
    </div>
</div>

@* Views/Profile/Index.cshtml *@
@section Scripts {
    @{
        await Html.RenderPartialAsync("_ValidationScriptsPartial");
    }
}